package com.five.service.impl;

import com.five.dao.FileMapper;
import com.five.entity.File;
import com.five.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/2/26.
 */
@Service("FileService")
public class FileServiceImpl implements FileService {

    @Autowired
    private FileMapper fileMapper;

    @Override
    public void addFile(File file) {
        fileMapper.insertSelective(file);
    }

    @Override
    public List<File> selectFiles(Integer fileGroupId) {
        return fileMapper.selectFilesByFileGroupId(fileGroupId);
    }
}
